package com.poseidon.support.uap.server.Controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.poseidon.support.uap.server.entity.Application;
import com.poseidon.support.uap.server.service.ApplicationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author baomidou
 * @since 2021-10-04
 */
@Controller
@RequestMapping("/application")
@Api(tags = "应用管理",value = "该接口")
public class ApplicationController {

    @Autowired
    ApplicationService applicationService;

    @ApiOperation(value = "应用列表",tags = "列表")
    @ResponseBody
    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public List<Application> list(@RequestParam String name) {
        System.err.println(name);
        return applicationService.list(new QueryWrapper<Application>().like("name", name));
    }
}

